home *** CD-ROM | disk | FTP | other *** search
/ More MacCube 2: Games / More MacCube Vol 2 Games.bin / Games / Xconq 7.0.1 / lib / ww2-adv.g < prev    next >
Text File  |  1995-08-22  |  9KB  |  380 lines

  1. (game-module "ww2-adv"
  2.   (title "WWII Advanced")
  3.   (blurb "Types for global-scale simulation of WWII, at national level")
  4.   )
  5.  
  6. ;;; Types.
  7.  
  8. (unit-type infantry (image-name "infantry")
  9.   (help "a primarily foot-powered army"))
  10. (unit-type armor (image-name "armor")
  11.   (help "a primarily mechanized army"))
  12.  
  13. (define ground-types (infantry armor))
  14.  
  15. (unit-type air-force (image-name "4e")
  16.   (help "ground support capability"))
  17. (unit-type bomber
  18.   (help "strategic bombing capability"))
  19. (unit-type interceptor (image-name "1e")
  20.   (help "anti-bomber capability"))
  21.  
  22. (define air-types (air-force bomber interceptor))
  23.  
  24. (unit-type convoy (image-name "ap"))
  25. (unit-type fleet (image-name "bb"))
  26. (unit-type cv-fleet (image-name "cv"))
  27. (unit-type sub-fleet (image-name "sub"))
  28. (unit-type asw-fleet (image-name "dd"#|"asw"|#))
  29.  
  30. (define ship-types (convoy fleet cv-fleet sub-fleet asw-fleet))
  31.  
  32. (unit-type base (image-name "airbase")
  33.   (help ""))
  34. (unit-type town (image-name "town20")
  35.   (help ""))
  36. (unit-type city (image-name "city20")
  37.   (help "major cities only"))
  38. (unit-type port-city (image-name "port")
  39.   (help "major port cities only"))
  40. (unit-type capital (image-name "city20")
  41.   (help "capital of a country or region"))
  42.  
  43. (define place-types (base town city port-city capital))
  44.  
  45. (define builders         (town city port-city capital))
  46.  
  47. (define inf infantry)
  48.  
  49. (material-type oil)
  50. (material-type planes)
  51.  
  52. (terrain-type sea (color "sky blue") (image-name "sea") (char ".")
  53.   (help "deep water"))
  54. (terrain-type shallows (color "cyan") (image-name "shallows") (char ","))
  55. (terrain-type swamp (color "yellow green") (image-name "swamp") (char "="))
  56. (terrain-type desert (color "yellow") (image-name "desert") (char "~")
  57.   (help "dry open terrain"))
  58. (terrain-type land (color "green") (image-name "plains") (char "+"))
  59. (terrain-type forest (color "forest green") (image-name "forest") (char "%"))
  60. (terrain-type mountains (color "sienna") (image-name "mountains") (char "^"))
  61. (terrain-type ice (color "white") (image-name "ice") (char "_"))
  62. (terrain-type neutral (color "gray") #|(image-name "ice")|# (char "-"))
  63. (terrain-type river (color "blue") (char "<")
  64.   (subtype border) (subtype-x river-x))
  65. (terrain-type cliffs (color "black") (char "|")
  66.   (subtype border))
  67. (terrain-type salt-marsh (color "blue") (char "=")
  68.   (subtype border))
  69. (terrain-type road (color "gray") (char ">")
  70.   (subtype connection) (subtype-x road-x))
  71.  
  72. ; need a coating for snow
  73.  
  74. ;(table terrain-interaction (river (sea shallows) non-terrain))
  75.  
  76. (add (sea shallows) liquid true)
  77.  
  78. (define sea-t* (sea shallows))
  79.  
  80. (define land-t* (desert land forest mountains))
  81.  
  82. ;;; Static relationships.
  83.  
  84. (table vanishes-on
  85.   (ground-types sea-t* true)
  86.   (ground-types ice true)
  87.   (ship-types land-t* true)
  88.   (ship-types ice true)
  89.   (place-types sea-t* true)
  90.   (place-types ice true)
  91.   (u* neutral true)
  92.   )
  93.  
  94. ;;; Unit-unit capacities.
  95.  
  96. ;(table unit-capacity-x
  97. ;  (cv fighter 4)
  98. ;  )
  99.  
  100. (table unit-size-as-occupant
  101.   (u* u* 99)  ; disable occupancy by default
  102.   (ground-types (convoy fleet) 1)
  103.   (ground-types place-types 20)
  104.   (air-types (convoy fleet cv-fleet) 1)
  105.   (air-types place-types 1)
  106.   (ship-types place-types 1)
  107.   )
  108.  
  109. (add (convoy fleet cv-fleet) capacity (2 1 2))
  110.  
  111. (add place-types capacity 40)
  112.  
  113. ;;; Unit-terrain capacities.
  114.  
  115. (table unit-size-in-terrain
  116.   (u* t* 1)
  117.   (ground-types t* 50)
  118.   (place-types t* 100)
  119.   )
  120.  
  121. (add t* capacity 100)
  122.  
  123. ;;; Unit-material capacities.
  124.  
  125. (table unit-storage-x
  126.   (u* oil 1)
  127.   (place-types oil (100 500 1000 1000 1000))
  128.   (air-types planes (200 100 200))
  129.   )
  130.  
  131. ;;; Vision.
  132.  
  133. (set terrain-seen true)
  134.  
  135. (add place-types see-always true)
  136.  
  137. ;;; Actions.
  138.  
  139. (add u* acp-per-turn 1)
  140.  
  141. (add ground-types acp-per-turn (4 5))
  142.  
  143. (add air-types acp-per-turn 4)
  144.  
  145. (add ship-types acp-per-turn 40)
  146.  
  147. (add base acp-per-turn 0)
  148.  
  149. ;;; Movement.
  150.  
  151. (add place-types speed 0)
  152.  
  153. (table mp-to-enter-terrain
  154. ;  ((cv bb) shallows 2)
  155. ;  (a (swamp forest mountains) 10)
  156.   (ground-types sea-t* 99)
  157.   (ship-types land-t* 99)
  158.   (u* ice 99)
  159.   (air-types ice 1)
  160.   (u* neutral 99)
  161. )
  162.  
  163. ;;; Marshes and cliffs should be basically uncrossable when landing.
  164.  
  165. ;;; Construction.
  166.  
  167. (add u* cp 3)
  168.  
  169. (table acp-to-create
  170.   (builders ground-types 1)
  171.   (builders air-types 1)
  172.   (builders ship-types 1)
  173.   )
  174.  
  175. (table cp-on-creation
  176.   (builders ground-types 1)
  177.   (builders air-types 1)
  178.   (builders ship-types 1)
  179.   )
  180.  
  181. (table acp-to-build
  182.   (builders ground-types 1)
  183.   (builders air-types 1)
  184.   (builders ship-types 1)
  185.   )
  186.  
  187. (table cp-per-build
  188.   (builders ground-types 1)
  189.   (builders air-types 1)
  190.   (builders ship-types 1)
  191.   )
  192.  
  193. (table supply-on-creation
  194.   (u* oil 1)
  195.   (air-types planes (20 10 20))
  196.   )
  197.  
  198. ;;; Repair.
  199.  
  200. (add ground-types hp-recovery (1.00 0.50))
  201.  
  202. (table auto-repair
  203.   (place-types ground-types 1.00)
  204.   )
  205.  
  206. (table auto-repair-range
  207.   ;; Replacements can easily get to nearby units.
  208.   (u* ground-types 1)
  209.   )
  210.  
  211. ;;; Production.
  212.  
  213. (table base-production
  214.   (place-types oil 1)
  215.   (base oil 0)
  216.   ((city capital) planes 10)
  217.   )
  218.  
  219. (table base-consumption
  220.   (air-types oil (3 8 3))
  221.   )
  222.  
  223. (table hp-per-starve
  224.   (air-types oil 1.00)
  225.   )
  226.  
  227. (table consumption-as-occupant
  228.   (air-types oil 1)
  229.   )
  230.  
  231. ;;; Combat.
  232.  
  233. (add ground-types hp-max (9 6))
  234.  
  235. (add place-types hp-max (3 36 48 48 48))
  236.  
  237. (table acp-to-attack
  238.   (u* u* 1)
  239.   (convoy u* 0)
  240.   )
  241.  
  242. ;; Air units attack by "firing" (ie raids).
  243.  
  244. (add air-types acp-to-fire 1)
  245.  
  246. (add air-types range (3 8 3))
  247.  
  248. (table withdraw-chance-per-attack
  249.   (infantry ground-types (20 10))
  250.   (armor    ground-types (30 20))
  251.   )
  252.  
  253. (table acp-for-retreat
  254.   (ground-types ground-types 1)
  255.   )
  256.  
  257. (table hit-chance
  258.   (u* u* 50)
  259.   ;; Convoys are not combat units.
  260.   (convoy u* 0)
  261.   (place-types infantry 20)
  262.   (place-types armor 10)
  263.   )
  264.  
  265. (table damage
  266.   (u* u* 1)
  267.   (convoy u* 0)
  268.   )
  269.  
  270. (table capture-chance
  271.   ;; Armor can be captured and made use of.
  272.   (ground-types armor 20)
  273.   ;; Cities offer basically zippo resistance to armies.
  274.   (ground-types place-types 90)
  275.   )
  276.  
  277. (table material-to-fight
  278.   (air-types planes (100 50 100))
  279.   )
  280.  
  281. ;;; Backdrop.
  282.  
  283. (table people-surrender-chance
  284.   (ground-types t* 100)
  285.   (place-types t* 100)
  286.   )
  287.  
  288. ;;; The world.
  289.  
  290. (world 360 (year-length 12))
  291.  
  292. ;;; Sides.
  293.  
  294. (set side-library '(
  295.   ((name "USA") (adjective "American") (emblem-name "flag-usa"))
  296.   ((name "UK") (adjective "British") (emblem-name "flag-uk"))
  297.   ((name "USSR") (adjective "Soviet") (emblem-name "soviet-star"))
  298.   ((name "France") (adjective "French") (emblem-name "flag-france"))
  299.   ((name "Germany") (adjective "German") (emblem-name "flag-swastika"))
  300.   ((name "Italy") (adjective "Italian") (emblem-name "flag-italy"))
  301.   ((name "Japan") (adjective "Japanese") (emblem-name "flag-japan"))
  302.   ((name "China") (adjective "Chinese") (emblem-name "flag-china"))
  303.   ((name "Spain") (noun "Spaniard") (adjective "Spanish") (emblem-name "flag-spain"))
  304.   ((name "Turkey") (adjective "Turkish") (emblem-name "flag-turkey"))
  305.   ))
  306.  
  307. (set calendar ("usual" "month"))
  308.  
  309. (set season-names
  310.   ((0 2 "winter") (3 5 "spring") (6 8 "summer") (9 11 "autumn")))
  311.  
  312. ;;; Random setup parameters (for testing).
  313.  
  314. (add t* alt-percentile-min   0)
  315. (add t* alt-percentile-max   0)
  316. (add (sea land) alt-percentile-min ( 0  70))
  317. (add (sea land) alt-percentile-max (70 100))
  318. (add t* wet-percentile-min   0)
  319. (add t* wet-percentile-max 100)
  320.  
  321. ;;; River generation.
  322.  
  323. (add (land forest mountains) river-chance (5000 10000 10000))
  324.  
  325. (set river-sink-terrain shallows)
  326.  
  327. ;;; Road generation.
  328.  
  329. (table road-into-chance
  330.   (t* land 100)
  331.   (land (desert forest mountains) (50 40 20))
  332.   )
  333.  
  334. (set edge-terrain ice)
  335.  
  336. (set country-radius-min 4)
  337.  
  338. ;(add u* start-with 1)
  339.  
  340. (add capital start-with 1)
  341.  
  342. ;(add (sea land) country-terrain-min (4 4))
  343.  
  344. (table favored-terrain
  345.   (u* t* 0)
  346.   (ground-types land 100)
  347.   (air-types land 100)
  348.   (ship-types sea 100)
  349.   (place-types land 100)
  350.   )
  351.  
  352. (add land country-people-chance 100)
  353.  
  354. (table unit-initial-supply
  355.   (u* oil 9999)
  356.   (air-types planes 9999)
  357.   )
  358.  
  359. (game-module (design-notes
  360.   "The basic idea of this game is to model the grand strategy of the WWII era."
  361.   "Scale is 1 deg or 90-100km/hex, 1 month/turn."
  362.   ""
  363.   "At this scale the details of maneuver become less important than managing"
  364.   "production and logistics."
  365.   ""
  366.   "Land units are infantry and armor armies, basically the same except that armor"
  367.   "is more highly mechanized."
  368.   ""
  369.   "Air forces represent strategic bombing abilities."
  370.   ""
  371.   "Convoys are primarily transport ships with some protection."
  372.   ""
  373.   "Fleets are battleship/cruiser fleets, while carrier fleets have a long-range"
  374.   "strike capability due to their aircraft."
  375.   "Submarine fleets represent a large number of subs operating over a wide area."
  376.   ""
  377.   "City production is very hard to change."
  378.   ))
  379.  
  380.